package com.dabai.iot.core.dto;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 属性消息发送输入类
 *
 * @author kev1n
 */
@Data
public class PropertyMessageInput implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull
    private Long deviceId;

    @NotNull
    private Long blockId;

    @NotEmpty
    private List<ItemParam> itemParams;

    @Data
    public static class ItemParam implements Serializable {

        @Serial
        private static final long serialVersionUID = 1L;

        private Long itemId;
        private String value;
    }

}
